package r21310.chap04.练习标准答案;

import java.util.Scanner;

public class PizzStore {
    public static Pizza getPizza(int num) {

        Pizza p = null;
        if (num == 1) {
            System.out.println("请输入配料");
            Scanner sc = new Scanner(System.in);
            String Peiliao = sc.next();
            System.out.println("请输入披萨大小");
            int size = sc.nextInt();
            System.out.println("请输入披萨的价格");
            int pice = sc.nextInt();
            p = new Haixianpizza("培根披萨", pice, size, Peiliao);
            System.out.println(p.show());

        }
        if (num == 2) {
            System.out.println("请输入克数");
            Scanner sc = new Scanner(System.in);
            int keshu = sc.nextInt();
            System.out.println("请输入披萨大小");
            int size = sc.nextInt();
            System.out.println("请输入披萨的价格");
            int pice = sc.nextInt();
            p = new Peigenpizza("培根披萨",pice,size,keshu );
            System.out.println(p.show());
        }

        return p;

    }




    }

